package com.hjduan.spring.cloud.feign.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.hjduan.spring.cloud.feign.hystric.HystricFeignService;
/**
 * 1.	在没有错误的情况下执行value对应的服务
 * 2.   出现错误执行fallback指定类中对应的函数
 * 作者：     段浩杰              2017年7月25日
 */
@FeignClient(value = "HJDUAN-SPRING-CLOUD-CONSUMER", fallback = HystricFeignService.class)
public interface FeignService {
	
	@RequestMapping(value = "/hi/{name}", method = RequestMethod.GET)
	String sayHiFromClientOne(@RequestParam(value = "name") String name);
}
